﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using MockPrjTeam2.Common;

namespace MockPrjTeam2.Entity
{
    public class TrustRegion
    {
        public int TrustRegionID { get; set; }
        public int CountryID { get; set; }
        public string TrustRegionName { get; set; }
        public string CountryName { get; set; }
        public string Description { get; set; }
        public bool IsActive { get; set; }

        public static TrustRegion MappingEntity(DataRow row)
        {
            TrustRegion trustRegion = null;
            if (row !=null)
            {
                trustRegion = new TrustRegion
                {
                    TrustRegionID = Utilities.ToInt(row, "TrustRegionID"),
                    CountryID = Utilities.ToInt(row, "CountryID"),
                    TrustRegionName = Utilities.ToString(row, "TrustRegionName"),
                    CountryName = Utilities.ToString(row, "CountryName"),
                    Description = Utilities.ToString(row, "Description"),
                    IsActive = Utilities.ToNullableBoolean(row, "IsActive")
                };
            }
            return trustRegion;
        }

    }
}